<!DOCTYPE html>
<html lang="zh-CN">
  <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
	  <#include "/common/plateform/include/common-base.ftl">
  <title>系统高级配置</title>
  <!-- Tell the browser to be responsive to screen width -->
</head>

<!-- Part 一、 以下是body主体内容的模块区域 -->
<body class="hold-transition ${sysColor} sidebar-mini">
<div class="wrapper">

	<!-- top start -->
	<#include "/common/plateform/top.ftl">
	<!-- top end -->

	<!-- left start -->
	<#include "/common/plateform/left-project.ftl">
	<!-- left end-->

  <div class="content-wrapper">
    <!-- Main start -->
	<section class="content">
      <div class="row">

		  <div class="col-xs-12">

			  <div class="nav-tabs-custom">
				  <ul class="nav nav-tabs" id="myTab-add">
					  <li class="active">
						  <a href="#tabAdd_1" data-toggle="tab">阿里云短信配置</a>
					  </li>
					  <li>
						  <a href="#tabAdd_2" data-toggle="tab">微信小程序配置</a>
					  </li>
					  <li>
						  <a href="#tabAdd_3" data-toggle="tab">邮箱配置</a>
					  </li>
					  <li>
						  <button class="btn btn-warning" onclick="loadCache()"><i class="fa fa-refresh"></i> 数据同步</button>
					  </li>
				  </ul>
				  <div class="tab-content">
                      <div class="text-danger f12">
                          <i class="fa fa-info-circle"></i> 重要提示：提交保存成功不代表立即生效，请确认无误后手动点击【数据同步】，只有数据同步成功才会生效。
                      </div>
					  <div class="tab-pane active" id="tabAdd_1" data-type-code="sms_aliyun" data-type-name="阿里云短信配置">
						  <div class="box box-solid">
							  <div class="box-body">
								  <form class="form-horizontal addFormBody" id="tabAdd_1_form" action="javascript:void(0)">
									  <input type="hidden" name="pageName" value="sys-app-config-addbatch"/>
									  <input type="hidden" name="formName" value="addFormBatch"/>
									  <input type="hidden" name="sysAppConfig.w_sysName" class="input_sysName"/>
									  <input type="hidden" name="sysAppConfig.w_typeCode" class="input_typeCode"/>
									  <input type="hidden" name="ifBatch" value="T"/>
									  <input type="hidden" name="sysAppConfig.splitAttr" value="appKey"/>
									  <table class="table table-bordered">
										  <thead>
										   <tr>
											  <th colspan="4">
												  <button id="tabAdd_1_btn_add" class="btn btn-default btn-xs hidden" onclick="addDetail('#tabAdd_1')"><i class="fa fa-plus-circle"></i> 增加新配置</button>
												  <button id="tabAdd_1_btn_init" class="btn btn-warning btn-xs hidden" onclick="firstInitTabData('#tabAdd_1')"><i class="fa fa-plus-circle"></i> 初始化默认配置</button>
												  <button id="tabAdd_1_btn_init" class="btn btn-default btn-xs" onclick="getTabData('#tabAdd_1')"><i class="fa fa-refresh"></i> 刷新数据</button>
											  </th>
										   </tr>
											<tr class="bg-info">
												<th class="w200">配置中文名称</th>
												<th class="w280">配置Key</th>
												<th>配置Value</th>
												<th class="w80 text-center">操作</th>
											</tr>
										  </thead>
										  <tbody id="tabAdd_1_body">
										  </tbody>
									  </table>
								  </form>
							  </div>
							  <div class="box-footer text-center">
								  <button id="tabAdd_1_btn_save" class="btn btn-danger hidden" type="button" onclick="submitForm1('tabAdd_1_form','#tabAdd_1','');" > 提交保存</button>
                              </div>
							  <div id="tabAdd_1_btn_test" class="box-footer hidden">
								  <table class="table w350">
									  <tr>
										  <td>
											  <input type="text" id="input_test_mobile" maxlength="11" class="form-control" value="" placeholder="请输入测试手机号"/>
										  </td>
										  <td>
											  <button  type="button" class="btn btn-success" onclick="testSmsSend()">测试发送</button>
										  </td>
									  </tr>
								  </table>
							  </div>
						  </div>
					  </div>

					  <div class="tab-pane" id="tabAdd_2" data-type-code="wechat_xcx" data-type-name="微信小程序配置">
						  <div class="box box-solid">
							  <div class="box-body">
								  <form class="form-horizontal addFormBody" id="tabAdd_2_form" action="javascript:void(0)">
									  <input type="hidden" name="pageName" value="sys-app-config-addbatch"/>
									  <input type="hidden" name="formName" value="addFormBatch"/>
									  <input type="hidden" name="sysAppConfig.w_sysName" class="input_sysName"/>
									  <input type="hidden" name="sysAppConfig.w_typeCode" class="input_typeCode"/>
									  <input type="hidden" name="ifBatch" value="T"/>
									  <input type="hidden" name="sysAppConfig.splitAttr" value="appKey"/>
									  <table class="table table-bordered">
										  <thead>
										  <tr>
											  <th colspan="4">
												  <button id="tabAdd_2_btn_add" class="btn btn-default btn-xs hidden" onclick="addDetail('#tabAdd_2')"><i class="fa fa-plus-circle"></i> 增加新配置</button>
												  <button id="tabAdd_2_btn_init" class="btn btn-warning btn-xs hidden" onclick="firstInitTabData('#tabAdd_2')"><i class="fa fa-plus-circle"></i> 初始化默认配置</button>
												  <button id="tabAdd_2_btn_init" class="btn btn-default btn-xs" onclick="getTabData('#tabAdd_2')"><i class="fa fa-refresh"></i> 刷新数据</button>
											  </th>
										  </tr>
										  <tr class="bg-info">
											  <th class="w200">配置中文名称</th>
											  <th class="w280">配置Key</th>
											  <th>配置Value</th>
											  <th class="w80 text-center">操作</th>
										  </tr>
										  </thead>
										  <tbody id="tabAdd_2_body">
										  </tbody>
									  </table>
								  </form>
							  </div>
							  <div class="box-footer text-center">
								  <button id="tabAdd_2_btn_save" class="btn btn-danger hidden" type="button" onclick="submitForm1('tabAdd_2_form','#tabAdd_2','');" > 提交保存</button>
							  </div>
						  </div>
					  </div>

					  <div class="tab-pane" id="tabAdd_3" data-type-code="email" data-type-name="邮箱配置">
						  <div class="box box-solid">
							  <div class="box-body">
								  <form class="form-horizontal addFormBody" id="tabAdd_3_form" action="javascript:void(0)">
									  <input type="hidden" name="pageName" value="sys-app-config-addbatch"/>
									  <input type="hidden" name="formName" value="addFormBatch"/>
									  <input type="hidden" name="sysAppConfig.w_sysName" class="input_sysName"/>
									  <input type="hidden" name="sysAppConfig.w_typeCode" class="input_typeCode"/>
									  <input type="hidden" name="ifBatch" value="T"/>
									  <input type="hidden" name="sysAppConfig.splitAttr" value="appKey"/>
									  <table class="table table-bordered">
										  <thead>
										  <tr>
											  <th colspan="4">
												  <button id="tabAdd_3_btn_add" class="btn btn-default btn-xs hidden" onclick="addDetail('#tabAdd_3')"><i class="fa fa-plus-circle"></i> 增加新配置</button>
												  <button id="tabAdd_3_btn_init" class="btn btn-warning btn-xs hidden" onclick="firstInitTabData('#tabAdd_3')"><i class="fa fa-plus-circle"></i> 初始化默认配置</button>
												  <button id="tabAdd_3_btn_refresh" class="btn btn-default btn-xs" onclick="getTabData('#tabAdd_3')"><i class="fa fa-refresh"></i> 刷新数据</button>
											  </th>
										  </tr>
										  <tr class="bg-info">
											  <th class="w200">配置中文名称</th>
											  <th class="w280">配置Key</th>
											  <th>配置Value</th>
											  <th class="w80 text-center">操作</th>
										  </tr>
										  </thead>
										  <tbody id="tabAdd_3_body">
										  </tbody>
									  </table>
								  </form>
							  </div>
							  <div class="box-footer text-center">
								  <button id="tabAdd_3_btn_save" class="btn btn-danger hidden" type="button" onclick="submitForm1('tabAdd_3_form','#tabAdd_3','');" > 提交保存</button>
							  </div>
							  <div id="tabAdd_3_btn_test" class="box-footer hidden">
								  <table class="table w350">
									  <tr>
										  <td>
											  <label class="form-control-static">收件人邮箱：</label>
										  </td>
										  <td>
											  <input type="text" id="input_test_email"  class="form-control" value="" placeholder="请输入测试收件人邮箱"/>
										  </td>

									  </tr>
									  <tr>
										  <td>
											  <label class="form-control-static">邮件内容：</label>
										  </td>
										  <td>
											  <input type="text" id="input_test_email_text"  class="form-control" value="" placeholder="请输入测试发送邮件内容"/>
										  </td>
									  </tr>
									  <tr>
										  <td colspan="2">
											  <button  type="button" class="btn btn-success" onclick="testEmailSend()">测试发送</button>
										  </td>
									  </tr>
								  </table>
							  </div>
						  </div>
					  </div>

				  </div>
			  </div>
        </div>

      </div>
		<script type="text/template" id="detailSave-template">
			<? for ( var i = 0; i < rows.length; i++) {?>
			<?var trIndex=i+'-'+new Date().getTime(); var isEdit = false;if('T'==rows[i].sysAppConfig.ifEdit){isEdit=true;}?>
			<tr>
				<td style="vertical-align:middle;">
					<input type="hidden" name="sysAppConfig.sysName" value="<?=rows[i].sysAppConfig.sysName?>"/>
					<input type="hidden" name="sysAppConfig.typeCode" value="<?=rows[i].sysAppConfig.typeCode?>"/>
					<input type="hidden" name="sysAppConfig.typeName" value="<?=rows[i].sysAppConfig.typeName?>"/>
					<input type="hidden" name="sysAppConfig.status" value="T"/>
					<input type="hidden" name="sysAppConfig.ifEdit" value="<?=rows[i].sysAppConfig.ifEdit?>"/>
					<input type="hidden" name="sysAppConfig.appRemark" value="<?=rows[i].sysAppConfig.appRemark?>"/>
					<?if(isEdit){?>
						<div class="form-group">
							<input type="text" id="app_name_<?=trIndex?>" name="sysAppConfig.appName" class="form-control" value="<?=rows[i].sysAppConfig.appName?>" placeholder="请输入配置中文名称"/>
						</div>
						<?}else{?>
						<input type="hidden" name="sysAppConfig.appName" value="<?=rows[i].sysAppConfig.appName?>"/>
						<?=rows[i].sysAppConfig.appName?>
					<?}?>
				</td>
				<td style="vertical-align:middle;">
					<?if(isEdit){?>
						<div class="form-group">
						<input type="text"id="app_key_<?=trIndex?>" onblur="checkIsExsit(this)" name="sysAppConfig.appKey" class="form-control" value="<?=rows[i].sysAppConfig.appKey?>" placeholder="请输入配置英文Key"/>
						</div>
					<?}else{?>
						<input type="hidden" name="sysAppConfig.appKey" value="<?=rows[i].sysAppConfig.appKey?>"/>
						<?=rows[i].sysAppConfig.appKey?>
					<?}?>
				</td>
				<td style="vertical-align:middle;">
					<input type="text" name="sysAppConfig.appValue" class="form-control" value="<?=rows[i].sysAppConfig.appValue?>" placeholder="请输入配置Value值"/>
					<?if(!strUtil.isNull(rows[i].sysAppConfig.appRemark)&&'_'!=rows[i].sysAppConfig.appRemark){?>
						<div class="fx8 f12"><?=rows[i].sysAppConfig.appRemark?></div>
					<?}?>
				</td>
				<td style="vertical-align: middle;text-align:center;">
					<i class="fa fa-trash-o" onclick="delApp(this,'<?=tabId?>','<?=rows[i].sysAppConfig.infoId?>')"></i>
				</td>
			</tr>
			<?}?>
		</script>
<!-- Part 三、 以下是js模块区域 -->
<script>
var clickMenu = "sys-app-config";
var myPage = 10;//定义列表数据
var defSysEname = strUtil.doNull(strUtil.getLocalStorage("sysEname"), "");
/**
 * 初始化数据字典，id传入#id 返回值Map用法：dictListMap["userType"][rows[i].userType]
 */
var dictListMap = DictUtil.initDictAndDymic();

$(function () {
    $('.input_sysName').val(defSysEname);
	getTabData('#tabAdd_1');//默认加载第一个tab
 });
//控制选项卡
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
	// 获取已激活的标签页的名称
	var tabId=$(e.target).attr("href");
	console.log('this.click.tabId',tabId);
	getTabData(tabId);
});
//查询后台配数据
function getTabData(tabId) {
	var index_load = layer.load(1, {shade: false});
	var typeObj = getTypeObj(tabId);
	var typeCode = typeObj.typeCode;
	var typeName = typeObj.typeName;
	$(tabId+'_form').find(".input_typeCode").val(typeCode);
	$.ajax({
		type:"get",
		url:common_list_url,dataType:"json",
		data: {'pageName':'sys-app-config','formName':'searchForm','sysAppConfig.w_sysName':defSysEname,'sysAppConfig.w_typeCode':typeCode},
		success: function(myData){
			layer.close(index_load);
			console.log('['+tabId+']['+typeCode+']['+typeName+'].res',myData);
			if("T"==myData.flag) {
				myData.tabId = tabId;
				if(myData.total>0){
					$(tabId+'_btn_init').addClass('hidden');
					$(tabId+'_btn_add').removeClass('hidden');
					$(tabId+'_btn_save').removeClass('hidden');
					if(tabId=='#tabAdd_1'){
                        $(tabId+'_btn_test').removeClass('hidden');
                    }
					var data = baidu.template("detailSave-template", eval(myData));
					$(tabId+'_body').html(data);
					checkCacheIsFlag(typeCode);
				}else{
					$(tabId+'_btn_init').removeClass('hidden');
					$(tabId+'_btn_add').addClass('hidden');
					$(tabId+'_btn_save').addClass('hidden');
					$(tabId+'_body').html('');
					if(tabId=='#tabAdd_1'){
						$(tabId+'_btn_test').addClass('hidden');
					}
				}
			}
		}
	});
}
//首次-初始化配置默认数据
function firstInitTabData(tabId) {
	var typeObj = getTypeObj(tabId);
	var typeCode = typeObj.typeCode;
	var typeName = typeObj.typeName;
	var initData = {
		'sms_aliyun':[
			{'sysAppConfig': {'ifEdit':'F','sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '是否启用短信服务', 'appKey': 'sms_code_start', 'appValue': 'F','appRemark':'T=启用，F=停用'}},
			{'sysAppConfig': {'ifEdit':'F','sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '通讯Key', 'appKey': 'sms_aliyun_accessKeyId', 'appValue': '','appRemark':'来自阿里云配置'}},
			{'sysAppConfig': {'ifEdit':'F','readonly':false,'sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '通讯秘钥', 'appKey': 'sms_aliyun_accessKeySecret', 'appValue': '','appRemark':'来自阿里云配置'}},
			{'sysAppConfig': {'ifEdit':'F','sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '短信签名', 'appKey': 'sms_aliyun_signName', 'appValue': '','appRemark':'来自阿里云配置'}},
			{'sysAppConfig': {'ifEdit':'F','sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '短信模板', 'appKey': 'sms_aliyun_templateCode', 'appValue': '','appRemark':'来自阿里云配置'}},
		],
		'wechat_xcx':[
			{'sysAppConfig': {'ifEdit':'F','sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '小程序名称', 'appKey': typeCode+'_name', 'appValue': '','appRemark':''}},
			{'sysAppConfig': {'ifEdit':'F','sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '小程序Id（AppId）', 'appKey': typeCode+'_appId', 'appValue': '','appRemark':'来自微信小程序配置'}},
			{'sysAppConfig': {'ifEdit':'F','readonly':false,'sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '小程序秘钥（AppSecret）', 'appKey': typeCode+'_appSecret', 'appValue': '','appRemark':'来自微信小程序配置'}},
		],
		'email':[
			{'sysAppConfig': {'ifEdit':'F','sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '发件人邮箱', 'appKey': typeCode+'_from_name', 'appValue': '','appRemark':''}},
			{'sysAppConfig': {'ifEdit':'F','sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '发送人邮箱授权码', 'appKey': typeCode+'_pwd', 'appValue': '','appRemark':'来自邮箱配置'}},
			{'sysAppConfig': {'ifEdit':'F','readonly':false,'sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '发送邮件服务器', 'appKey': typeCode+'_host', 'appValue': '','appRemark':'来自邮箱配置，例如：smtp.163.com'}},
			{'sysAppConfig': {'ifEdit':'F','readonly':false,'sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '邮件主题', 'appKey': typeCode+'_subject', 'appValue': '','appRemark':''}}
		]
	};

	$(tabId+'_form').find(".input_typeCode").val(typeCode);
	var myData = {
		rows: initData[typeCode]
	};
	console.log('['+tabId+']init.list',myData);
	myData.tabId = tabId;
	var data_detail = baidu.template("detailSave-template",eval(myData));
	$(tabId+'_body').append(data_detail);
	$(tabId+'_btn_init').addClass('hidden');
	$(tabId+'_btn_add').removeClass('hidden');
	$(tabId+'_btn_save').removeClass('hidden');
}
//添加一行配置明细文本框
function addDetail(tabId) {
	var typeObj = getTypeObj(tabId);
	var typeCode = typeObj.typeCode;
	var typeName = typeObj.typeName;
	var myData = {
		rows: [{'sysAppConfig': {'ifEdit':'T','sysName':defSysEname,'typeCode':typeCode,'typeName':typeName,'appName': '', 'appKey': '', 'appValue': '','appRemark':''}}]
	};
	console.log('['+tabId+']add.item',myData);
	myData.tabId = tabId;
	var data_detail = baidu.template("detailSave-template",eval(myData));
	$(tabId+'_body').append(data_detail);
}
function getTypeObj(tabId) {
	var typeCode = strUtil.doNull($(tabId).attr('data-type-code'),'');
	var typeName = strUtil.doNull($(tabId).attr('data-type-name'),'');
	var obj ={'typeCode':typeCode,'typeName':typeName};
	console.log('['+tabId+']typeObj',obj);
	return obj;
}
function loadCache(){
	var index_load = layer.msg("数据同步进行中。。。",{time:false});
	$.ajax({
		type:'post',
		url: common_cache_url+"init",
		data:{"pageName":"sys-app-config-list","formName":"initiCacheForm","sysAppConfig.w_sysName":defSysEname},
		dataType:'json',
		success: function(myData){
			console.log("sysAppConfig.initiCacheForm",myData);
			layer.close(index_load);
			layer.alert(myData.msg);
		}
	});
}
//短信发送测试
function testSmsSend(){
	var mb = $("#input_test_mobile").val();
	if(strUtil.isNull(mb)){
		layer.tips('请输入测试手机号！', '#input_test_mobile', {tips: 3});
		return;
	}
	if(isNaN(mb)||mb.trim().length!=11){
		layer.tips('请输入正确的手机号！', '#input_test_mobile', {tips: 3});
		return;
	}
    var index_load = layer.msg("正在发送中。。。",{time:false});
    $.ajax({
        type:'post',contentType:"application/json",
        url:ctx+"/api/sendSmsCode",
        data:JSON.stringify({"mobile":mb,"sysName":defSysEname}),
        dataType:'json',
        success: function(myData){
            console.log("send.sms.res",myData);
            layer.close(index_load);
            layer.alert(myData.msg);
        }
    });
}
//判断缓存中是否存在数据
function checkCacheIsFlag(typeCode) {
	var csn = defSysEname+'_app_config';
	var ckey = "app_config";
	$.ajax({
		type: 'get',
		url: common_cache_url+"view",
		data:{"cacheSpaceName":csn,"cachekey":ckey},
		dataType: 'json',
		success: function (myData) {
			// console.log('view.cache',myData);
			if(myData && myData.flag=='T' && myData.msg=='暂无数据'){
				console.log(csn+"->"+ckey,'缓存中无配置数据，请及时数据同步！');
				layer.msg("请重新点击数据同步！");
			}else{
				console.log(csn+"->"+ckey,'缓存中已存在，若更改后请及时同步最新数据！');
			}
		}
	});
}
//提交tab1表单数据
function submitForm1(formId,thisTabId,nextTabId){
	//校验规则-表单提交时触发
	if(!checkValidate(thisTabId)){ //如果校验不通过就返回
		return;
	}
	var index_submit = layer.confirm('您确定要保存信息吗？', {btn: ['Yes','No'],closeBtn: 0,offset: '220px'}
	, function(){
		var result = submitForm(formId);
		layer.close(index_submit);
		if(result){
			layer.msg("操作成功！");
			getTabData(thisTabId);
			if(!strUtil.isNull(nextTabId)){
				$('.nav-tabs a[href=\"'+nextTabId+'\"]').tab('show'); // Select tab by name
			}
		}
	});
}
//提交表单数据
function submitForm(formId){
	var result;
	var index_load = layer.load(1, {shade: false});
	$.ajax({
		type:'post',
		url:common_submit_url,
		data:$("#"+formId).serialize(),
		async:false,
		dataType:'json',
		success: function(myData){
			console.log(myData);
			if(myData.flag=="T"){
				result = myData;
			}else{
				layer.alert(myData.msg);
			}
			layer.close(index_load);
		},
		error: function (e) {
			layer.close(index_load);
		}
	});
	return result;
}
function checkValidate(tabId) {
	var formObj=$(tabId+"_form");
	var flag = true;
	var reg = /^[0-9a-zA-Z_.]+$/;
	formObj.find("input[type='text']").each(function (i) {
		var inputName = $(this).attr('name');
		var inputVal = $(this).val();
		var inputId =$(this).attr('id');
		if(inputName=='sysAppConfig.appName'){
			if(strUtil.isNull(inputVal)){
				layer.tips('此项必填项！', '#'+inputId, {tips: 3});
				flag = false;
				return;
			}
		}
		if(inputName=='sysAppConfig.appKey'){
			if(strUtil.isNull(inputVal)){
				layer.tips('此项必填项！', '#'+inputId, {tips: 3});
				flag = false;
				return;
			}
			if(!reg.test(inputVal)){
				layer.tips('只能由数字、字母组、下划线成！', '#'+inputId, {tips: 3});
				flag = false;
				return;
			}
		}
	});
	return flag;
}
function checkIsExsit(obj) {
	if(strUtil.isNull($(obj).val())){
		return;
	}
	var index_load = layer.load(1, {shade: false});
	var paramLoadData = {};
	paramLoadData['pageName']='sys-app-config';
	paramLoadData['formName']='searchForm';
	paramLoadData['sysAppConfig.w_appKey']=$(obj).val();
	var inputId = $(obj).attr('id');
	$.getJSON(common_list_url,paramLoadData, function(myData2){
		console.log('sysAppConfig.valid.res',myData2);
		layer.close(index_load);
		if(myData2.total>0){
			layer.tips('该配置Key已存在，请更换其他', '#'+inputId, {tips: 3});
			$(obj).val('');
			return;
		}
	});
}
function delApp(obj,tabId, id) {
	if(strUtil.isNull(id)){
		$(obj).parent().parent().remove();
		return;
	}
	var index_submit = layer.confirm("您确定要删除信息吗？", {btn: ["Yes","No"],closeBtn: 0,offset: "220px"}
	, function(){
		layer.close(index_submit);
		var index_load = layer.load(1, {shade: false});
		var paramLoadData = {};
		paramLoadData['pageName']='sys-app-config';
		paramLoadData['formName']='delForm';
		paramLoadData['sysAppConfig.w_infoId']=id;
		$.ajax({
			type:'post',
			url:common_submit_url,
			data:paramLoadData,
			dataType:'json',
			success: function(myData){
				console.log('del.data',tabId+"->"+id,myData);
				if(myData.flag=="T"){
					getTabData(tabId);
				}else{
					layer.alert(myData.msg);
				}
				layer.close(index_load);
			},
			error: function (e) {
				layer.close(index_load);
			}
		});
	});
}
</script>
</section>
<!-- Main end -->   
</div>
	<!-- foot start -->
	<#include "/common/plateform/foot.ftl">
	<!-- foot start -->
</div>
<!-- /.content-wrapper -->
</body>
</html>














